<me:RZPRULES x:Class="WPFExcelReport.TRZRULES"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT"   
                    xmlns:AP="clr-namespace:WPFExcelReport;assembly=TAPKOPF"  
                    xmlns:WF="clr-namespace:WPFExcelReport;assembly=TWAFARBEN"  
                     xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                     x:Name="TV"
                    Loaded="Window_Loaded">
    <me:RZPRULES.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTBoolToVisibilityConverter x:Key="nbv"/>
        <ucd:NOTConverter  x:Key="not"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:PNumConverter x:Key="pnum"/>
    </me:RZPRULES.Resources>
    <StackPanel>
        <WrapPanel> 
            <TextBlock Text="{Binding Source={Localization:Translate Word=生产单:}}"/>
            <TextBlock   Text="{Binding Path=KRS}" Foreground="Red"  />
            <TextBlock   Text="{Binding Source={Localization:Translate Word=-}}" Foreground="Red"  />
            <TextBlock   Text="{Binding Path=LFD,Converter={StaticResource pnum}}" Foreground="Red"  />
            <TextBlock   Text="{Binding Source={Localization:Translate Word=-}}" Foreground="Red"  />
            <TextBlock   Text="{Binding Path=POS,Converter={StaticResource pnum}}" Foreground="Red"  />
        </WrapPanel>
         
        <WrapPanel>
            <WrapPanel >
                <TextBlock Text="{Binding RLPRART,ElementName=TV}"/> 
            </WrapPanel> 
        </WrapPanel> 
        <WrapPanel  >
            <TextBlock Text="{Binding Source={Localization:Translate Word=流程:}}"/>
            <TextBlock  Text="{Binding FLOW,ElementName=TV}" Visibility="{Binding IsEdit,Converter={StaticResource nbv}}"/>
            <AP:TSAP02   IsEdit="{Binding IsEdit,ElementName=TV}"
                      ARTST="F"
                       Name="cAP02"
                      KEY ="{Binding FLOW,ElementName=TV}"   
                      ORDERNUM ="{Binding FLOW,ElementName=TV}"  
                      WH="{Binding WH,ElementName=TV}"
                     dwAP="{Binding dwAP,ElementName=TV}" 
                      />
        </WrapPanel>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="60"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=目标数量}}"></TextBlock>
            <ex:NumericBox  Grid.Column="1" Text="{Binding Path=QTYEND}" 
                     HorizontalAlignment="Left" Width="80" />
        </Grid>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="60"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=交期}}"></TextBlock>
            <ex:NumericBox  Grid.Column="1"  Text="{Binding Path=DELDATE}"    
                     HorizontalAlignment="Left" Width="100"/>
        </Grid>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="60"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=开始日期}}"></TextBlock>
            <ex:NumericBox  Grid.Column="1"   Text="{Binding Path=STARTDATE}" 
                     Width="100"
                     HorizontalAlignment="Left"/>
        </Grid>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="60"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=周期}}"></TextBlock>
            <ex:NumericBox  Grid.Column="1"   Text="{Binding Path=LEADTIME}" 
                     Width="40" HorizontalAlignment="Left"/>
        </Grid>

        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=损耗%}}"></TextBlock>
            <TextBox Grid.Column="1"  Text="{Binding Path=F01}" 
                     Width="60" HorizontalAlignment="Left"   />
        </Grid>
    </StackPanel>
</me:RZPRULES>
